package primes;

/**
 * Calculates if a number n is prime 
 * without using the concept of parallel processing
 * 
 */

public class DefaultPrime implements Prime {

	@Override
	public boolean prime(long number) {
		double limit = Math.sqrt(number);
		
		if (number == 1 || number == 0) {
			return false;
		}
		
		for (int i = 2; i <= limit; i++) {
			if (number % i == 0) {
				return false;
			}
		}
		
		return true;
	}
}
